package com.yy.mapper;

import com.github.pagehelper.Page;
import com.yy.anno.AutoFill;
import com.yy.entity.Employee;
import com.yy.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface EmployeeMapper {


    /**
     * 根据用户名查询员工
     *
     * @param username
     * @return
     */
    Employee getByUsername(String username);

    @AutoFill(OperationType.INSERT)
    void insert(Employee emp);

    Page<Employee> list(String name);

    Employee getById(Integer id);

    @AutoFill(OperationType.INSERT)
    void update(Employee emp);

}
